package com.org.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.org.bean.common.DisasterInfo;
import com.org.dao.common.DisasterInfoMapper;
import com.org.service.DisasterService;

@Service("disasterService")
public class DisasterServiceimpl implements DisasterService {
	@Autowired
	private DisasterInfoMapper disasterInfoMapper;

	@Override
	public List<DisasterInfo> findAll() {
		// TODO Auto-generated method stub
		return disasterInfoMapper.findAll();
	}

	@Override
	public List<DisasterInfo> findById(int tunnelId) {
		// TODO Auto-generated method stub
		return disasterInfoMapper.findById(tunnelId);
	}

	@Override
	public boolean addDisaster(DisasterInfo disasterInfo) {
		// TODO Auto-generated method stub
		return disasterInfoMapper.addDisaster(disasterInfo);
	}

	@Override
	public boolean deleteDisaster(int disasterId) {
		// TODO Auto-generated method stub
		return disasterInfoMapper.deleteDisaster(disasterId);
	}

	@Override
	public boolean updateDisaster(DisasterInfo disasterInfo) {
		// TODO Auto-generated method stub
		return disasterInfoMapper.updateDisaster(disasterInfo);
	}

	@Override
	public List<DisasterInfo> findByName(String disasterName) {
		// TODO Auto-generated method stub
		return disasterInfoMapper.findByName(disasterName);
	}

	@Override
	public void updateProposal(DisasterInfo disasterInfo) {
		// TODO Auto-generated method stub
		   disasterInfoMapper.updateProposal(disasterInfo);
	}

	@Override
	public List<DisasterInfo> findProposalbyId(int disasterId) {
		// TODO Auto-generated method stub
		return disasterInfoMapper.findProposalbyId(disasterId);
	}

}
